import {createRouter, createMemoryHistory, createWebHistory} from "vue-router";
import LayoutView from '@/views/layout/LayoutView.vue'

import SystemView from '@/views/layout/SystemView.vue'
import SysUserView from '@/views/sysuser/SysUserView.vue'
import ConsultView from '@/views/consult/ConsultView.vue'
import LoginView from '@/views/index/LoginView.vue'
import RegisterView from '@/views/index/RegisterView.vue'
import ArticleView from "@/views/article/ArticleView.vue";
import ArticleCategory from "@/views/articleCategory/ArticleCategory.vue";
import FMView from "@/views/fm/FMView.vue";
import PsyKnowledge from "@/views/psyKnowledge/PsyKnowledge.vue";
import WelfareView from "@/views/welfare/WelfareView.vue";
import ConsultantView from "@/views/consultant/ConsultantView.vue";
import PubUser from "@/views/User/PubUser.vue";
import Inform_bulletin from "@/views/inform_bulletin/Inform_bulletinView.vue";
import Inform_bulletinView from "@/views/inform_bulletin/Inform_bulletinView.vue";
import CompanyView from "@/views/Company/CompanyView.vue";
import PricingStandard from "@/views/pricingStandard/PricingStandard.vue";
import XldyView from '@/views/xldy/XldyView.vue'
import QuestionView from '@/views/question/QuestionView.vue'
import FeedbackView from '@/views/feedback/FeedbackView.vue'
import FeedbackSysView from '@/views/feedback/FeedbackSys.vue'
import QuestionSys from "@/views/question/QuestionSys.vue";
import CourseView from '@/views/course/CourseView.vue'
import CourseSortView from '@/views/course/CourseSortView.vue'
import CourseCommentView from '@/views/course/CourseCommentView.vue'
import ConsultBook from "@/views/consultbook/ConsultBook.vue";
import ConsultFeedback from "@/views/consultbook/ConsultFeedback.vue";
import FieldView from "@/views/teacher/FieldView.vue";
import SortView from "@/views/teacher/SortView.vue";
import LevelView from "@/views/teacher/LevelView.vue";
import UserReviews from "@/views/consultbook/UserReviews.vue";
import LayoutSys from "@/views/layout/LayoutSys.vue";
import ArticleSys from "@/views/article/ArticleSys.vue";
import ArticleCategorySys from "@/views/articleCategory/ArticleCategorySys.vue";
import PsyKnowledgeSys from "@/views/psyKnowledge/PsyKnowledgeSys.vue";
import FMViewSys from "@/views/fm/FMViewSys.vue";
import WelfareViewSys from "@/views/welfare/WelfareViewSys.vue";
const routes = [
    {
        path: '/',
        name: '',
        component: LayoutView,
        redirect: '/login',//重定向
        children: [

            {
                path:'system',
                name:'system',
                component: SystemView,
            },
            {
                path:'feedback',
                name:'feedback',
                component: FeedbackView
            },
            {
                path: 'question',
                name:'question',
                component: QuestionView
            },

            {
                path: 'article',
                name: 'article',
                component: ArticleView
            },
            {
                path: 'articleCategory',
                name:'articleCategory',
                component: ArticleCategory
            },
            {
                path: 'psyKnowledge',
                name:'psyKnowledge',
                component: PsyKnowledge
            },
            {
                path: 'course',
                name:'course',
                component: CourseView
            },
            {
                path: 'courseSort',
                name:'courseSort',
                component: CourseSortView
            },{
                path: 'courseComment',
                name:'courseComment',
                component: CourseCommentView,
            },
            {
                path: 'fm',
                name:'fm',
                component: FMView
            },
            {
                path: 'welfare',
                name:'welfare',
                component: WelfareView
            },

            {
                path: 'consult',
                name:'consult',
                component: ConsultView
            },
            {
                path:'consultBook',
                name:'consultBook',
                component: ConsultBook
            },
            {
                path: 'consultFeedback',
                name: 'consultFeedback',
                component: ConsultFeedback
            },



            {
                path: 'userReviews',
                name: 'userReviews',
                component: UserReviews
            },
            {
                path: 'xldy',
                name:'xldy',
                component: XldyView
            },

            {
                path: 'inform_bulletinView',
                name:'inform_bulletinView',
                component: Inform_bulletinView
            },

            {
                path: 'company',
                name:'company',
                component: CompanyView
            }
        ]
    },

    {
        path: '/sys',
        name: '',
        component: LayoutSys,
        redirect: '/login',
        children: [
            {
                path: 'pubuser',
                name:'pubuser',
                component: PubUser
            },
            {
                path: 'sysuser',
                name: 'sysuser',
                component: SysUserView
            },

            {
                path:'inform_bulletin',
                name:'inform_bulletin',
                component: Inform_bulletin
            },

            {
                path:'company',
                name:'company',
                component: CompanyView
            },
            {
                path:'questionsys',
                name:'questionsys',
                component: QuestionSys
            },
            {
                path:'feedbacksys',
                name:'feedbacksys',
                component: FeedbackSysView
            },
            {
                path:'system',
                name:'system',
                component: SystemView
            },

            {
                path: 'pricingStandard',
                name:'pricingStandard',
                component: PricingStandard
            },
            {
                path: 'levelView',
                name: 'levelView',
                component: LevelView
            },
            {
                path: 'sortView',
                name: 'sortView',
                component: SortView
            },
            {
                path:'fieldView',
                name:'fieldView',
                component: FieldView
            },
            {
                path: 'consultant',
                name:'consultant',
                component: ConsultantView
            },
            {
                path: 'articles',
                name: 'articles',
                component: ArticleSys
            },
            {
                path: 'articleCategorys',
                name:'articleCategorys',
                component: ArticleCategorySys
            },
            {
                path: 'psyKnowledges',
                name:'psyKnowledges',
                component: PsyKnowledgeSys
            },
            {
                path: 'fms',
                name:'fms',
                component: FMViewSys
            },
            {
                path: 'welfares',
                name:'welfares',
                component: WelfareViewSys
            }
        ]
    },


    {path: '/login', name: 'login', component: LoginView},
    {path: '/register', name: 'register', component: RegisterView},
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
